Optimal. Leaf size=191 \[ \frac{\left (a^2-b^2\right ) \left (b^2 n-a^2 (n+4)\right ) \sin ^{n+1}(c+d x) \, _2F_1\left (1,n+1;n+2;-\frac{b \sin (c+d x)}{a}\right )}{a^2 b^4 d (n+1)}+\frac{\left (3 a^2-2 b^2\right ) \sin ^{n+1}(c+d x)}{b^4 d (n+1)}+\frac{\left (a^2-b^2\right )^2 \sin ^{n+1}(c+d x)}{a b^4 d (a+b \sin (c+d x))}-\frac{2 a \sin ^{n+2}(c+d x)}{b^3 d (n+2)}+\frac{\sin ^{n+3}(c+d x)}{b^2 d (n+3)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.364907, antiderivative size = 191, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.138, Rules used = {2837, 950, 1620, 64} \[ \frac{\left (a^2-b^2\right ) \left (b^2 n-a^2 (n+4)\right ) \sin ^{n+1}(c+d x) \, _2F_1\left (1,n+1;n+2;-\frac{b \sin (c+d x)}{a}\right )}{a^2 b^4 d (n+1)}+\frac{\left (3 a^2-2 b^2\right ) \sin ^{n+1}(c+d x)}{b^4 d (n+1)}+\frac{\left (a^2-b^2\right )^2 \sin ^{n+1}(c+d x)}{a b^4 d (a+b \sin (c+d x))}-\frac{2 a \sin ^{n+2}(c+d x)}{b^3 d (n+2)}+\frac{\sin ^{n+3}(c+d x)}{b^2 d (n+3)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2837
Rule 950
Rule 1620
Rule 64
Rubi steps
\begin{align*} \int \frac{\cos ^5(c+d x) \sin ^n(c+d x)}{(a+b \sin (c+d x))^2} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (\frac{x}{b}\right )^n \left (b^2-x^2\right )^2}{(a+x)^2} \, dx,x,b \sin (c+d x)\right )}{b^5 d}\\ &=\frac{\left (a^2-b^2\right )^2 \sin ^{1+n}(c+d x)}{a b^4 d (a+b \sin (c+d x))}+\frac{\operatorname{Subst}\left (\int \frac{\left (\frac{x}{b}\right )^n \left (-b^3 n-\frac{a^4 (1+n)}{b}+2 a^2 b (1+n)+a \left (\frac{a^2}{b}-2 b\right ) x-\frac{a^2 x^2}{b}+\frac{a x^3}{b}\right )}{a+x} \, dx,x,b \sin (c+d x)\right )}{a b^4 d}\\ &=\frac{\left (a^2-b^2\right )^2 \sin ^{1+n}(c+d x)}{a b^4 d (a+b \sin (c+d x))}+\frac{\operatorname{Subst}\left (\int \left (\frac{\left (3 a^3-2 a b^2\right ) \left (\frac{x}{b}\right )^n}{b}-2 a^2 \left (\frac{x}{b}\right )^{1+n}+a b \left (\frac{x}{b}\right )^{2+n}+\frac{\left (a^2-b^2\right ) \left (b^2 n-a^2 (4+n)\right ) \left (\frac{x}{b}\right )^n}{b (a+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{a b^4 d}\\ &=\frac{\left (3 a^2-2 b^2\right ) \sin ^{1+n}(c+d x)}{b^4 d (1+n)}-\frac{2 a \sin ^{2+n}(c+d x)}{b^3 d (2+n)}+\frac{\sin ^{3+n}(c+d x)}{b^2 d (3+n)}+\frac{\left (a^2-b^2\right )^2 \sin ^{1+n}(c+d x)}{a b^4 d (a+b \sin (c+d x))}+\frac{\left (\left (a^2-b^2\right ) \left (b^2 n-a^2 (4+n)\right )\right ) \operatorname{Subst}\left (\int \frac{\left (\frac{x}{b}\right )^n}{a+x} \, dx,x,b \sin (c+d x)\right )}{a b^5 d}\\ &=\frac{\left (3 a^2-2 b^2\right ) \sin ^{1+n}(c+d x)}{b^4 d (1+n)}+\frac{\left (a^2-b^2\right ) \left (b^2 n-a^2 (4+n)\right ) \, _2F_1\left (1,1+n;2+n;-\frac{b \sin (c+d x)}{a}\right ) \sin ^{1+n}(c+d x)}{a^2 b^4 d (1+n)}-\frac{2 a \sin ^{2+n}(c+d x)}{b^3 d (2+n)}+\frac{\sin ^{3+n}(c+d x)}{b^2 d (3+n)}+\frac{\left (a^2-b^2\right )^2 \sin ^{1+n}(c+d x)}{a b^4 d (a+b \sin (c+d x))}\\ \end{align*}
Mathematica [A] time = 0.398096, size = 143, normalized size = 0.75 \[ \frac{\sin ^{n+1}(c+d x) \left (\frac{\left (a^2-b^2\right )^2 \, _2F_1\left (2,n+1;n+2;-\frac{b \sin (c+d x)}{a}\right )}{a^2 (n+1)}-\frac{4 \left (a^2-b^2\right ) \, _2F_1\left (1,n+1;n+2;-\frac{b \sin (c+d x)}{a}\right )}{n+1}+\frac{3 a^2-2 b^2}{n+1}-\frac{2 a b \sin (c+d x)}{n+2}+\frac{b^2 \sin ^2(c+d x)}{n+3}\right )}{b^4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 1.326, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{5} \left ( \sin \left ( dx+c \right ) \right ) ^{n}}{ \left ( a+b\sin \left ( dx+c \right ) \right ) ^{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sin \left (d x + c\right )^{n} \cos \left (d x + c\right )^{5}}{{\left (b \sin \left (d x + c\right ) + a\right )}^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (-\frac{\sin \left (d x + c\right )^{n} \cos \left (d x + c\right )^{5}}{b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2}}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sin \left (d x + c\right )^{n} \cos \left (d x + c\right )^{5}}{{\left (b \sin \left (d x + c\right ) + a\right )}^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]